package cc.rengu.igas.channel.cpcn.common.util;

/**
 * @author wukefan
 * @version 1.0.0
 * @date 2020/7/27 14:17
 */
public class CpcnTransferUtil {


    /**
     * 法人行与中金机构转换
     * 中金机构号转法人行
     */
    public static String cpcnInstIdTransfer2CorpBank(String cpcnInstId) {
        String instId = "800";
        switch (cpcnInstId) {
            case ("003049"):
                instId = "832";
                break;
            case ("002837"):
                instId = "866";
                break;
            case ("002838"):
                instId = "866";
                break;
            case ("003859"):
                instId = "815";
                break;
            case ("006072"):
                instId = "810";
                break;
            default:
                instId = "800";
                break;
        }
        return instId;
    }

    /**
     * 法人行与中金机构转换
     * 法人行转中金机构号
     */
    public static String corpInstIdTransfer2Cpcn(String instId) {
        String cpcnInstId = null;
        switch (instId) {
            case ("003049"):
                instId = "832";
                break;
            case ("002837"):
                instId = "866";
                break;
            case ("002838"):
                instId = "866";
                break;
            case ("003859"):
                instId = "815";
                break;
            case ("006072"):
                instId = "810";
                break;
            default:
                instId = "800";
                break;
        }
        return cpcnInstId;
    }
}
